package com.showworkflow.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import java.nio.file.Path;
import java.nio.file.Paths;

@Configuration
public class FileStorageConfig {

    @Value("${file.storage.base-path:./uploads}")
    private String basePath;

    @Bean
    public Path fileStoragePath() {
        return Paths.get(basePath).toAbsolutePath().normalize();
    }

    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
}